Telegram Group & Telegram Channel
17. Program to Find Fraction Subtraction.

import java.util.*;

class FractionSubtraction
{
public static void main(String args[])
{
float a,b,c,d;
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a : ");
a = scanner.nextFloat();
System.out.print("Enter b : ");
b = scanner.nextFloat();
System.out.print("Enter c : ");
c = scanner.nextFloat();
System.out.print("Enter d : ");
d = scanner.nextFloat();

// fraction addition formula ((a*d)-(b*c))/(b*d)
System.out.print("Fraction subtraction : [( "+a+" * "+d+" )-( "+b+" * "+c+" ) / ( "+b+" * "+d+" )] = "+(((a*d)-(b*c))/(b*d)));
}
}

@java_codings



tg-me.com/java_codings/26
Create:
Last Update:

17. Program to Find Fraction Subtraction.

import java.util.*;

class FractionSubtraction
{
public static void main(String args[])
{
float a,b,c,d;
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a : ");
a = scanner.nextFloat();
System.out.print("Enter b : ");
b = scanner.nextFloat();
System.out.print("Enter c : ");
c = scanner.nextFloat();
System.out.print("Enter d : ");
d = scanner.nextFloat();

// fraction addition formula ((a*d)-(b*c))/(b*d)
System.out.print("Fraction subtraction : [( "+a+" * "+d+" )-( "+b+" * "+c+" ) / ( "+b+" * "+d+" )] = "+(((a*d)-(b*c))/(b*d)));
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/26

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

What is Telegram?

Telegram is a cloud-based instant messaging service that has been making rounds as a popular option for those who wish to keep their messages secure. Telegram boasts a collection of different features, but it’s best known for its ability to secure messages and media by encrypting them during transit; this prevents third-parties from snooping on messages easily. Let’s take a look at what Telegram can do and why you might want to use it.

Advance Java ‍ from ye


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA